package com.celan.task.standard;

/**
 * @author Celan
 * @description 异步任务状态枚举
 */
public enum AysncTaskStatusEnum {
    TASK_NOT_FOUND(0, "NOT_FOUND", "任务不存在"),
    TASK_INIT(1, "INIT", "任务初始化"),
    TASK_WAITING(2, "WAITING", "任务等待中 "),
    TASK_PENDING(3, "PENDING", "任务排队中"),
    TASK_PROCESSING(4, "PROCESSING", "任务处理中"),
    TASK_SUCCESS(5, "SUCCESS", "任务成功"),
    TASK_FAILED(6, "FAILED", "任务失败"),
    TASK_RETRY(7, "RETRY", "任务待重试"),
    TASK_TIMEOUT(8, "TIMEOUT", "任务超时");

    final int statusNum;
    final String statusStr;
    final String statusDesc;

    AysncTaskStatusEnum(int statusNum, String statusStr, String statusDesc) {
        this.statusNum = statusNum;
        this.statusStr = statusStr;
        this.statusDesc = statusDesc;
    }

    public int getStatusNum() {
        return this.statusNum;
    }

    public String getStatusStr() {
        return this.statusStr;
    }
}
